<?php if (!defined("_ECRIRE_INC_VERSION")) return;
/**
 * Aloha Cart
 *
 * @author     Aleksey Yaroshchuk (aleksey.yaroshchuk@gmail.com)
 * @license    GNU/GPL
 * @package    plugins
 * @subpackage alohacart
 * @copyright  (c) Aleksey Yaroshchuk 2011-2012
 * @link       http://www.spip-contrib.net/AlohaCart
 */

include_spip('functions/pdk_common');

function formulaires_alohacart_cart_order_charger_dist(){
	$valeurs = array();
	   
    $cart = pdk_load_class('Alohacart','classes');
    $product_mdl = pdk_load_class('ProductModel','classes');
    $order_mdl = pdk_load_class('AlohacartOrderModel','classes');
    
    $valeurs['products_ids'] = $cart->GetProductsIDs(); // Just products IDs
    $valeurs['products'] = $cart->GetProducts(); // Products quantities, actually  
    //$valeurs['products_prices'] = $cart->GetProductsTotals(); // Products total prices
    $valeurs['products_prices'] = $cart->GetProductsTotals(); // Products total prices
    
    $valeurs = array_merge($valeurs, $order_mdl->get_empty());
    $valeurs['register_me'] = '';
    
    $valeurs['id_payment'] = '';
    $valeurs['id_shipping'] = '';
    
	return $valeurs;
}
